package org.jg.arkanoid.controller;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import org.jg.arkanoid.bonuses.Guns;

public class GunsKeyListener  implements KeyListener{

	Guns guns;
	
	public GunsKeyListener(Guns guns)
	{
		this.guns = guns;
	}
	
	@Override
	public void keyPressed(KeyEvent e) {
		int preddesKey = e.getKeyCode();
		if(preddesKey == KeyEvent.VK_SPACE)
		{
			guns.fire();
		}
	}

	@Override
	public void keyReleased(KeyEvent arg0) {
	}

	@Override
	public void keyTyped(KeyEvent arg0) {
	}

}
